The disclosure herein relates generally to personal computers (xe2x80x9cPCSxe2x80x9d) and, more particularly, to a method and apparatus for diagnosing and conveying the identity of a hanging test or initialization in POST on a non-booting or hanging PC and for identifying a failure in a no-POST/no-video PC without requiring user intervention.
During the boot sequence of a PC, if the PC encounters a critical or catastrophic failure, there is currently no simple, reliable mechanism for alerting the user or a technician to the cause thereof. If the failure locks up the PC prior to video initialization, the PC will appear to be dead. After video installation, the PC displays what has already been tested in POST, but does not display the current, xe2x80x9changing,xe2x80x9d test. Any failure that causes the PC to hang is reset when the PC is rebooted, so POST continues down the original path to the hanging test with no notification.
Error conditions in POST are conventionally indicated by one or both of audio tones provided through a speaker of the PC and text messages written to the video display of a PC. For example, most BIOS systems for PCS are configured to provide a beep tone if a portion of a POST routine has failed. As another example, most PCS have pre-stored error messages that are accessed and displayed if certain error conditions are encountered.
Beyond beep tones and pre-stored error messages, many current PCS make more detailed information available to a user by writing to an I/O port, typically I/O address port 0080h (xe2x80x9cport 80hxe2x80x9d). Such detailed information may be accessed by a user by installation of a special expansion card, called a POST or a xe2x80x9cPort 80,xe2x80x9d card. Installation of a POST card, however, requires removing the PC""s cover and installing the card in one of the expansion slots typically provided within the chassis of the PC. The installation and configuration of expansion cards is a task beyond the expertise of most computer users.
Other methods exist for diagnosing PC board-level problems, such as logic analyzers, in-circuit analyzers, oscilloscopes, and diagnostic LEDs; however, each of these methods is expensive and requires user-intervention to determine the cause of the problem.
It is clear from the foregoing that there is currently no reliable method for alerting a user of the nature of a failure if a reboot is required to restart the PC. Accordingly, it is likely that the user will attempt to replace parts until the failure is resolved or will be required to bring the PC in to undergo failure analysis using expensive, specialized debugging and analysis equipment.
Therefore, what is needed is a method for determining the extent and probable cause of a critical failure during the boot sequence of a PC without requiring direct contact with the PC to allow for correct parts dispatch to resolve the problem with only one dispatch and at the lowest cost and within the shortest time frame.
One embodiment, accordingly, is a method and apparatus for conveniently diagnosing and conveying to a user the cause of a failure during POST of a non-booting PC. In one embodiment, when a code identifying (xe2x80x9cID codexe2x80x9d) a test or initialization process (hereinafter collectively xe2x80x9cPOST procedurexe2x80x9d) is written to port 80h, the ID code is also written into a byte designated a xe2x80x9cPOST code fieldxe2x80x9d in a non-volatile storage device, such as a flash ROM or CMOS device. If the PC xe2x80x9changsxe2x80x9d prior to completion of POST, there will be a non-zero byte in the POST code field identifying which POST procedure resulted in the hang. Accordingly, if during boot-up of the PC, a non-zero byte is detected in the POST code field, indicating that the previous boot failed, the byte, or ID code, will be beeped to the user to identify the POST procedure that caused the PC to hang. Using a published port 80h code listing, the user or technician will be able to determine what procedure POST was attempting to execute when the hang-up occurred.
Upon successful completion of the POST sequence and prior to INT18h/INT19h operating system boot, the POST code field is set to zero to signal POST completion without catastrophic error. Accordingly, the POST process is able to continue through the normal sequence and flag any non-catastrophic errors as it normally does and will pinpoint any catastrophic errors that require a reboot.
In an alternative embodiment, after the ID code identifying the next POST procedure to be performed has been written to port 80h and to the POST code field, a timeout value representing the maximum amount of time required to complete the upcoming POST procedure is added to a watchdog timer. At that point, the POST procedure is initiated. If the watchdog timer times out, the PC will automatically re-boot. Upon re-boot, if the value stored in the POST code field is non-zero, indicating that the watchdog timer triggered and a catastrophic failure has occurred, the POST code field value will be beeped as a message to the user, as described above. In addition, during this second boot, POST can continue to proceed until it hits the hanging POST procedure identified by the beeped value. Based on the functionality, POST can determine whether to skip the hanging POST procedure or automatically enter a more granular, in-depth, test for that procedure, again using the watchdog timer to avoid infinite POST loops.
A technical advantage achieved is that the embodiments provide an inexpensive, easy, and convenient method of diagnosing and remedying catastrophic failures occurring during boot-up of a PC.
A technical advantage achieved with the alternative embodiment is that the ID code identifying the hanging POST procedure is communicated to the user without requiring the user to re-boot the PC.
Another technical advantage achieved with the alternative embodiment is that it provides the ability to automatically recover from or delve more deeply into a hanging POST procedure.